# Maintainer: Balló György <ballogyor+arch at gmail dot com>
# Contributor: Andreas Radke <andyrtr@archlinux.org>
# Contributor: Sarah Hay <sarah@archlinux.org>

pkgname=libmpeg2
pkgver=0.5.1
pkgrel=8
pkgdesc='Library for decoding MPEG-1 and MPEG-2 video streams'
arch=('loong64' 'x86_64')
url='https://libmpeg2.sourceforge.io/'
license=('GPL2')
depends=('glibc')
makedepends=('libxv' 'sdl')
optdepends=('libxv: mpeg2dec command'
            'sdl: mpeg2dec command')
source=("https://libmpeg2.sourceforge.io/files/$pkgname-$pkgver.tar.gz")
sha256sums=('dee22e893cb5fc2b2b6ebd60b88478ab8556cb3b93f9a0d7ce8f3b61851871d4')

build() {
  cd $pkgname-$pkgver
  ./configure --prefix=/usr
  make
}

package() {
  cd $pkgname-$pkgver
  make DESTDIR="$pkgdir" install
}
